//
//  BaseCell.m
//  MoneyIndividual
//
//  Created by Le Anh Tai on 12/24/13.
//  Copyright (c) 2013 Le Anh Tai. All rights reserved.
//

#import "BaseCell.h"

@implementation BaseCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        _subView = [[UIView alloc] init];
        _subView.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:_subView];
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    
    if (selected)
    {
        
        self.contentView.backgroundColor = COLOR_GRAY;
    }
    else
    {
        self.contentView.backgroundColor = COLOR_WHITE_PURE;        
    }
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _subView.frame = self.contentView.bounds;
}
@end
